<ul class="nav pull-left">
	<!--	<li class="dropdown"><a href="#" class="dropdown-toggle" ><i class="icon-home"></i>&nbsp;Dashboard</a></li>
	-->
	<!-- BEGIN INBOX DROPDOWN -->
	<?php
		$hasMenuAdmin = FALSE;
		$hasMenuInbox = FALSE;
		$hasMenuViewer = FALSE;
		$menuInbox = "";
		$pas=0;
		foreach ($userProfiles as $up){
			if ($up->getProfile()->getId() != 6 && $up->getProfile()->getMenuInbox() != "" && $pas==0){
				echo '<li class="dropdown"><a href="'.base_url().'dashboard/manager" class="dropdown-toggle" ><i class="icon-home"></i>&nbsp;Dashboard</a></li>';
				$pas++;
			}
			
			if ($up->getProfile()->getMenuInbox() != ""){
				$hasMenuViewer = TRUE;
				$hasMenuInbox = TRUE;
				$menuInbox = $menuInbox . '<li >
							<a href="'.base_url().'inbox/profile/'.$up->getProfile()->getId().'">'.$up->getProfile()->getMenuInbox().'</a>
					  </li>';	
		    } else {
				if ($up->getProfile()->getNamaProfile() == "ADMINISTRATOR"){
					$hasMenuAdmin = TRUE;
					$hasMenuViewer = TRUE;
				} 
				
				if ($up->getProfile()->getNamaProfile()== "VIEWER"){
					$hasMenuViewer = TRUE;
				}
			}				
		} 
	?>
	<?php if ($hasMenuInbox == TRUE){?>
	<li class="dropdown" id="header_inbox_bar">
		<a href="#" class="dropdown-toggle" data-toggle="dropdown">
			<i class="icon-envelope-alt"></i>
			Pelaporan
		</a>
		<ul class="dropdown-menu extended inbox">
			<?php echo $menuInbox ?>
		</ul>
	</li> 
	<?php } ?>
	<!-- END INBOX DROPDOWN -->
	<?php if ($hasMenuViewer == TRUE) { ?>
		<li class="dropdown"><a href="<?php echo base_url()?>report/rekapLaporan" class="dropdown-toggle" ><i class="icon-tasks"></i>&nbsp;Laporan</a></li>
	<?php } ?>
	
	<?php if ($hasMenuAdmin == TRUE) { ?>
	<li class="dropdown">
		<a href="#" class="dropdown-toggle" data-toggle="dropdown">
			<i class="icon-certificate"></i>
			Pengaturan			
		</a>
		<ul class="dropdown-menu extended inbox">
			<li>
				<a href="<?php echo base_url()?>administration/userList">Pengaturan User</a>					
				
			</li>
			<li>
				<a href="<?php echo base_url()?>administration/propinsiList">Pengaturan Propinsi</a>					
				
			</li>
			<li>
				<a href="<?php echo base_url()?>administration/distrikList">Pengaturan Distrik</a>					
				
			</li>
		</ul>
	</li>
	<?php } ?>
	
		
</ul>